﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace Valuttakalkulator
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            bool isNew;
            System.Threading.Mutex m = Alxandr.CommonLibraries.ApplicationProcess.CreateApplicationMutex(Application.ProductName, out isNew);
            if (!isNew || Alxandr.CommonLibraries.ApplicationProcess.ApplicationIsRunning())
            {
                MessageBox.Show("Valuttakalkulator kjører allerede.");
                return;
            }
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new ValuttaForm());
            GC.KeepAlive(m);
        }
    }
}
